package com.dingreading.cloud.admin.service;

import com.dingreading.cloud.admin.dto.vo.BookLabelVO;
import com.dingreading.cloud.admin.entity.StoreBooks;
import com.dingreading.cloud.common.util.PageUtil;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface StoreBooksService extends IService<StoreBooks> {

    Page<StoreBooks> pageList(PageUtil pageUtil, Long storeId, String keyword, Integer status, Long journalId,
                              Long bookLabelId, Integer isbnStatus);

    List<StoreBooks> getByBooksId(Long bookId);


    void updateStatus(Long id, Integer status);


    int dropBean(Long id);

    /**
     * jdbc批量新增门店书籍
     * 连接数据库时添加rewriteBatchedStatements=true
     */
    void saveBatch(List<StoreBooks> list);

    // 获取门店未分类的书籍
    List<StoreBooks> getNoLabelName(Long storeId);

    // 更新书籍的分类
    void updateLabelId(Long storeId, String isbn, Long bookLabelId, String bookLabelName);

    int getStoreBookCnt(Long storeId);

    void dbUpdateLabelInfoByIsbn(List<BookLabelVO> voList);
}
